package cn.edu.neusoft.yyd208.foodorder.model;

import cn.edu.neusoft.yyd208.foodorder.bean.LoginBean;
import cn.edu.neusoft.yyd208.foodorder.iface.LoginIface;
import cn.edu.neusoft.yyd208.foodorder.listener.TListener;
import cn.edu.neusoft.yyd208.foodorder.service.Service;
import retrofit2.Call;
import retrofit2.Retrofit;


//针对一个花括号做出的调整
public class LoginModel extends RetrofitBaseModel implements LoginIface<LoginBean>{
    private Service service;
    private Retrofit retrofit;

    public LoginModel(){
        retrofit=getRetrofit();
    }

    @Override
    public void getLoginMessage(String username, String userpass, final TListener<LoginBean> tListener) {
        service=getService();//写在retrofit=getRetrofit();和Call<LoginBean> call=service.getlogin(username,userpass);
        Call<LoginBean> call=service.getlogin(username,userpass);
        callenqueue(call,tListener);
    }
}
